import * as API from '../axios'

export default {

    createModify: (params) => {
        const url = '/manage/sys-roles'
        const headers = {'lang-key': params.id ? 'branch_Edit' : 'branch_Create'}
        if (params.id) {
            return API.axiosPutAPI(url, params, headers)
        } else {
            return API.axiosPostAPI(url, params, headers)
        }
    },


    getList: (params) => {
        return API.axiosGetAPI('/manage/sys-roles', params)
    },

    getDetail: (id) => {
        return API.axiosGetAPI(`/manage/sys-roles/${id}`)
    },

    // 获取角色菜单树
    getTree: () => {
        return API.axiosGetAPI(`/manage/sys-roles/menu-tree`)
    },

}





